package com.netease.Dao;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.netease.jichu.User;
//在用户层里需要得到用户的账户及密码，nickname用来显示在页面的顶部，
//还需要得到用户的类型，0为买家。1为卖家
public interface UserDao {
	@Results({
		@Result(property="userName",column="username"),
		@Result(property="password",column="password")
	})
	@Select("select * from person where userName=#{0} and password=#{1}")//
//	public User getUserInfo(User user);
	public User verifyUser(String userName, String password);
	@Results({
		@Result(property="id",column="id")
	})
	@Select("select * from person where id=#{id} ")
	public User getUserInfo(int id);
}
 